class Solution:
    def repeatedSubstringPattern(self, s: str) -> bool:
        for i in range(1, (len(s) >> 1) + 1):
            if len(s) % i != 0:
                continue

            flag = len(s) // i
            temp = s[: i]
            s_tmp = temp * flag

            if s == s_tmp:
                return True
        else:
            return False
